//
//  MXHandleAleartV.m
//  HNBaseProject
//
//  Created by xujie on 2024/6/5.
//

#import "MXHandleAleartV.h"

@implementation MXHandleAleartV

- (instancetype)initWithFrame:(CGRect)frame {
    if (self = [super initWithFrame:frame]) {
        [self createUI];
    }
    return self;
}

- (void)createUI {
    self.bgImageV = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"visible_aleart"]];
    [self addSubview:self.bgImageV];
    [self.bgImageV mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.right.top.bottom.offset(0);
    }];
    
    self.topLab = [[UILabel alloc] init];
    self.topLab.textColor = [UIColor colorWithHexString:@"#000000"];
    self.topLab.font = PFRFontMedium(16);
    self.topLab.text = @"正在泄压";
    [self addSubview:self.topLab];
    [self.topLab mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.offset(27);
        make.centerX.mas_equalTo(self);
    }];
    
    self.bottomLab = [[UILabel alloc] init];
    self.bottomLab.textColor = [UIColor dc_colorWithHexString:@"#000000" alpha:0.75];
    self.bottomLab.font = PFRFontMedium(10);
    self.bottomLab.text = @"预计等待10S, 请勿重复点击";
    [self addSubview:self.bottomLab];
    [self.bottomLab mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(self.topLab.mas_bottom).offset(6);
        make.centerX.mas_equalTo(self);
    }];
}

- (void)reloadViewWithTitle:(NSString *)title subTitle:(NSString *)subTitle {
    self.topLab.text = title;
    self.bottomLab.text = subTitle;
}

@end
